package com.hncic.tx.center.dao;

import org.springframework.jdbc.core.BeanPropertyRowMapper;
import org.springframework.jdbc.core.RowMapper;
import org.springframework.stereotype.Repository;

import com.hncic.tx.center.common.model.Account;
import com.hncic.tx.center.common.util.UtilJdbc;

/**
 * @author smj E-mail: 463136320@qq.com
 * @created 2017年8月18日 上午10:34:15
 * @since jdk1.8 
 * @version 1.0
 * @describe 
 */
@Repository
public class AccountDao extends BaseDao {
	private static final RowMapper<Account> accountRM = BeanPropertyRowMapper.newInstance(Account.class);

	public Account queryAccount(String account) {
		return UtilJdbc.queryForObject(jdbcTemplate, Sql.QUERY, accountRM, account);
	}

	private final static class Sql {
		private static final String QUERY = "select * from t_account where  account = ?";
	}
}

